Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor dropTA to use panel functionality #114

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

erichung0404
Copy link

Since S4 method and chartSeries.chob are deprecated, dropTA, listTA and
get.chob functions are refactored to use panel functionality of xts::plot.xts
and coordinate with the refactored chartSeries and add* functions.

The way TAs are removed is based on the frame they are added to.
If an indicator is drawn on the price series, frame=2 or frame=-2, for example,
its action will be set to NULL; otherwise plot_object$remove_frame() is called to
remove the new frame created by the indicator and reset asp.

Since S4 method and chartSeries.chob are deprecated, dropTA, listTA and
get.chob functions are refactored to use panel functionality of
xts::plot.xts.

The way TAs are removed is based on which frame they are added to.
To reduce memory usage temporary storage is dropped and "replace()" function
is applied to re-order TAs and function calls instead. actions and y limits
are re-ordered according to the frames.
In addition to the movement of TA, function calls and actions are
re-ordered as well.
When "ta" is not characters of functions from TTR
(SMA, BBands, ...), shading regime or new series are
added if "ta" is logic or an object of xts class, respectively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants